package com.boulderai.mcp.model.llm;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.JsonNode;

/**
 * 大模型工具调用模型
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class LlmToolCall {
    
    @JsonProperty("id")
    private String id;
    
    @JsonProperty("type")
    private String type; // "function"
    
    @JsonProperty("function")
    private LlmFunction function;
    
    public LlmToolCall() {}
    
    public LlmToolCall(String id, String type, LlmFunction function) {
        this.id = id;
        this.type = type;
        this.function = function;
    }
    
    // Getters and Setters
    public String getId() {
        return id;
    }
    
    public void setId(String id) {
        this.id = id;
    }
    
    public String getType() {
        return type;
    }
    
    public void setType(String type) {
        this.type = type;
    }
    
    public LlmFunction getFunction() {
        return function;
    }
    
    public void setFunction(LlmFunction function) {
        this.function = function;
    }
    
    /**
     * 函数调用信息
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public static class LlmFunction {
        
        @JsonProperty("name")
        private String name;
        
        @JsonProperty("arguments")
        private String arguments; // JSON字符串格式的参数
        
        public LlmFunction() {}
        
        public LlmFunction(String name, String arguments) {
            this.name = name;
            this.arguments = arguments;
        }
        
        // Getters and Setters
        public String getName() {
            return name;
        }
        
        public void setName(String name) {
            this.name = name;
        }
        
        public String getArguments() {
            return arguments;
        }
        
        public void setArguments(String arguments) {
            this.arguments = arguments;
        }
    }
}